package com.onpositive.datamap.values.impl;

import com.onpositive.data.diskstorage.AbstractValueAccessor;
import com.onpositive.datamap.IDataPropertyValue;
import com.onpositive.datamap.core.IDataProperty;

public class LinkValue extends BasicValue {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private String url;
	
	protected LinkValue(){
		
	}

	public LinkValue(IDataProperty prop, String comment, String url) {
		super(prop, comment);
		this.url = url;
	}

	@Override
	public void render(ITokenAcceptor token) {
		token.acceptInternalIdentifier(getComment().toString(), url,
				prop.getId());
	}

	@Override
	public IDataPropertyValue clone(AbstractValueAccessor accessor) {
		return new LinkValue(getProperty().clone(accessor), (String) getComment(), url);
	}

}
